Google News
logo
jQuery - Interview Questions
What is the purpose of fadeToggle() method in JQuery?
he jQuery fadeToggle() method is used to toggle between the fadeIn() and fadeOut() methods. If the elements are faded in, it makes them faded out, and if they are faded out, it makes them faded in.
 
Syntax :
$(selector).fadeToggle();  
$(selector).fadeToggle(speed,callback);   
$(selector).fadeToggle(speed, easing, callback);  
 
speed : It is an optional parameter. It specifies the speed of the delay. Its possible values are slow, fast and milliseconds.
 
easing: It specifies the easing function to be used for transition.
 
callback: It is also an optional parameter. It specifies the function to be called after completion of fadeToggle() effect.
Advertisement